<?php
  include('../php_includes.php');
  //require_once 'admin_options.php';

 // Deleting admin message
      $check = $_POST["hide"];
      sqlConnect();
      $checkUser = sqlQuery("select User FROM Messages WHERE User = 'ADMIN';"); 
      $result = mysql_num_rows($checkUser);
      if($result == 1)
      {
        $sql = "DELETE FROM Messages WHERE User = 'ADMIN';";
        // Perform Query
        sqlQuery($sql);
        $statusMgs = "Your message was deleted.";
        sqlExit();
      }
      else 
      {
        $statusMgs = "There is no message to be deleted";
      }
    
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
    <title>Payroll and Timesheet Management Website</title>
    <link rel="stylesheet" type="text/css" href="adminStyle.css"/>
	<script type="text/javascript" src="pwcheck.js">
	</script>
  </head>
  <body>
  
	<?php writeHeader(); ?>
       <p> <?php echo $statusMgs; ?> </p>
       <p><a href='adminMessage.php'>Go back to Admin Message</a></p>
</body>
</html>
	